$(document).ready(function(){
	
	  $('#loginForm').find(':text, :password').each(function() {
		  	inputPlaceholder(this);
	  });

	  $('#loginForm').submit(function() {
		  
			if (!currentUserName || (this.site_username.value != currentUserName)) return true;	
			
			$(this).ajaxSubmit({
				url: '<?=Mozg::Router('http')->Create('module=admin&ctrl=users&action=login_process');?>',
				dataType: 'json',
			    success: function (data){
							HandleResponseJSON(data, function(data){
								$('#statusBar').html(data);
							});
						}
			});		
			
			return false;
	  });
});